#ifndef JEDITOPERATIONWIDGET_H
#define JEDITOPERATIONWIDGET_H

#include <QTEGui/qteguiglobal.h>
#include <QMenuBar>

namespace QTE
{

class JEditOperationWidgetPrivate;

class QTEGUI_EXPORT JEditOperationWidget : public QMenu
{
	Q_OBJECT

public:
	explicit JEditOperationWidget(QWidget *editorOrBrowser);
	~JEditOperationWidget();

public:
	void setWidget(QWidget *editorOrBrowser);

Q_SIGNALS:
	void select();
	void endSelection();

Q_SIGNALS:
	void cut(const QString &text);
	void copy(const QString &text);
	void paste(const QString &text);

Q_SIGNALS:
	void selectAll();
	void closed();

protected:
	void showEvent(QShowEvent *event) override;
	void closeEvent(QCloseEvent *event) override;

protected:
	bool eventFilter(QObject*, QEvent*) override;

private:
	JEditOperationWidgetPrivate *d_ptr;
};

} //namespace QTE


#endif //JEDITOPERATIONWIDGET_H
